count = 0
anxin_set = {'1','2','3','4'}
for num in range(123,432+1):#1,2,3,4组成3位数，最小123，最大432
    num_set = set(str(num))
    if len(num_set) == 3 and num_set | anxin_set == anxin_set:
        print(num,end=" ")
        count += 1
    if count == 15:
        break



# a = {'1','2','3','7'}
# b = {'1','2','3','4'}
# print(a,b)
# c = a | b
# print(c)
# print(a,b)












